﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using POSSystem.DAL;
using System.Web;

namespace POSSystem.BLL
{
    public class BranchRole : _BranchRole
    {
        public static BranchRole GetBranchRoleByBranchID(int branchID)
        {
            BranchRole role = new BranchRole();
            role.Where.BranchID.Value = branchID;
            role.Query.Load();

            return role;
        }

        public const string CURRENT_BRANCH_ROLE = "CURRENT_BRANCH_ROLE";

        public static BranchRole CurrentBranchRole
        {
            get
            {
                return (BranchRole)HttpContext.Current.Session[CURRENT_BRANCH_ROLE];
            }
            set { HttpContext.Current.Session[CURRENT_BRANCH_ROLE] = value; }
        }
    }
}
